#ifndef STEERING_H_
#define STEERING_H_

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <inttypes.h>
#include <avr/io.h>
#include <avr/interrupt.h> 
#include "uart.h"
#include "motion_control/motor.h"
#include "motion_control/servo.h"

#define MAXPULSFREQ 500 // 2ms => 500HZ

#define TIMER_MAXPULS F_CRYSTAL/MAXPULSFREQ // Timer1 value for a 2ms Puls

#define MINPULS TIMER_MAXPULS/4  // min pulslength = 0.5ms
#define MAXPULS TIMER_MAXPULS // max pulslength=2ms

/**
 * These are the settings under which all servos are addressable.
 **/
#define SERVO_PORT PORTB
/**
 * These are the settings under which all servos are addressable.
 **/
#define SERVO_DDR DDRB
/**
 * The reload time for the servos.
 **/
#define SERVO_RELOAD ((byte) 0x0A)

extern void init_motion_control(void);

extern void init_to_Zero(void);

#endif /*STEERING_H_*/
